﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ship.aspx.cs" Inherits="Fishing._default" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>钓船申请</title>

    <link href="static/bootstrap-3.3.7-dist/css/bootstrap.css" rel="stylesheet" />
    <link href="static/bootstrapvalidator-master/dist/css/bootstrapValidator.css" rel="stylesheet" />

    <script src="static/bootstrapvalidator-master/vendor/jquery/jquery.min.js"></script>
    <script src="static/bootstrap-3.3.7-dist/js/bootstrap.min.js"></script>
    <script src="static/bootstrapvalidator-master/dist/js/bootstrapValidator.js"></script>

    <style type="text/css">
        body {
            font-size: 50px;
        }

        label {
            font-weight: bolder;
            font-size: 50px;
            font-weight: bold;
        }

        input[type='text'] {
            font-size: 45px;
            height: 90px;
        }
        .glyphicon {
            padding: 80px;
        }
    </style>

</head>
<body style="height: 100%;">

    <section>
        <form id="form1" runat="server" class="form-horizontal">

            <div class="well" style="height: 90vh; overflow-y: scroll;">
                <div class="form-group col-md-12">
                    <label class="text-left">联系人</label>
                    <asp:TextBox runat="server" ID="txtContact" CssClass="form-control"></asp:TextBox>
                </div>
                <div class="form-group col-md-12">
                    <label class="text-left ">电话</label>
                    <asp:TextBox runat="server" ID="txtPhone" CssClass="form-control"></asp:TextBox>
                </div>
                <div class="form-group col-md-12">
                    <label class="text-left ">船名</label>
                    <asp:TextBox runat="server" ID="txtShipName" CssClass="form-control "></asp:TextBox>
                </div>
                <div class="form-group col-md-12">
                    <label class="text-left ">船长姓名</label>
                    <asp:TextBox runat="server" ID="txtShipCaptain" CssClass="form-control"></asp:TextBox>
                </div>
                <div class="form-group col-md-12">
                    <label class="text-left ">联系电话</label>
                    <asp:TextBox runat="server" ID="txtShipPhone" CssClass="form-control"></asp:TextBox>
                </div>
                <div class="form-group col-md-12">
                    <label class="text-left ">上船地点</label>
                    <asp:TextBox runat="server" ID="txtShipWharf" CssClass="form-control"></asp:TextBox>
                </div>
                <div class="form-group col-md-12">
                    <label class="text-left ">包船金额</label>
                    <asp:TextBox runat="server" ID="txtShipAmount" CssClass="form-control"></asp:TextBox>
                </div>
                <div class="form-group col-md-12">
                    <label class="text-left ">钓位价</label>
                    <asp:TextBox runat="server" ID="txtFishingPrice" CssClass="form-control"></asp:TextBox>
                </div>
                <div class="form-group col-md-12">
                    <label class="text-left ">钓位限坐人数</label>
                    <asp:TextBox runat="server" ID="txtFishingQty" CssClass="form-control"></asp:TextBox>
                </div>
                <div class="form-group col-md-12">
                    <label class="text-left ">其他</label>
                    <asp:TextBox runat="server" ID="txtRES" CssClass="form-control"></asp:TextBox>
                </div>


            </div>

            <footer class="navbar-fixed-bottom" style="margin-bottom: -15px;">
                <div class="form-group">
                    <asp:Button runat="server" ID="btnSubmit" CssClass="btn btn-success btn-lg btn-block" Style="height: 10vh;font-size: 40px;font-weight: bold" Text="提 交" OnClick="btnSubmit_Click" />
                </div>

            </footer>

        </form>

    </section>
</body>
</html>
<script type="text/javascript">

    window.onresize = function () {
        //等比设置你的div高度

    }

    $(document).ready(function () {


        $('#form1').bootstrapValidator({
            // 默认提示消息
            message: '当前值验证不通过！',
            // 表单框里右侧的icon
            feedbackIcons: {
                valid: 'glyphicon glyphicon-ok',
                invalid: 'glyphicon glyphicon-remove',
                validating: 'glyphicon glyphicon-refresh'
            },
            fields: {
                txtContact: {
                    validators: {
                        notEmpty: {
                            message: '联系人不能为空'
                        }
                        //stringLength: {  //长度限制
                        //    min: 6,
                        //    max: 18,
                        //    message: '用户名长度必须在6到18位之间'
                        //},
                        //regexp: { //正则表达式
                        //    regexp: /^[a-zA-Z0-9_]+$/,
                        //    message: '用户名只能包含大写、小写、数字和下划线'
                        //},
                        //different: {  //比较
                        //    field: 'username', //需要进行比较的input name值
                        //    message: '密码不能与用户名相同'
                        //},
                        //identical: {  //比较是否相同
                        //    field: 'password',  //需要进行比较的input name值
                        //    message: '两次密码不一致'
                        //},
                        //remote: { // ajax校验，获得一个json数据（{'valid': true or false}）
                        //    url: 'user.php',       //验证地址
                        //    message: '用户已存在',   //提示信息
                        //    type: 'POST',          //请求方式
                        //    data: function (validator) {  //自定义提交数据，默认为当前input name值
                        //        return {
                        //            act: 'is_registered',
                        //            username: $("input[name='username']").val()
                        //        };
                        //    }
                        //}
                    }
                },
                txtPhone: {
                    validators: {
                        notEmpty: {
                            message: '电话不能为空'
                        },
                        regexp: { //正则表达式
                            regexp: /^1(3|4|5|7|8)\d{9}$/,
                            message: '电话号码格式不正确'
                        }
                    }
                },
                txtShipName: {
                    validators: {
                        notEmpty: {
                            message: '船名不能为空'
                        }
                    }
                },
                txtShipCaptain: {
                    validators: {
                        notEmpty: {
                            message: '船长姓名不能为空'
                        }
                    }
                },
                txtShipPhone: {
                    validators: {
                        notEmpty: {
                            message: '联系电话不能为空'
                        },
                        regexp: { //正则表达式
                            regexp: /^1(3|4|5|7|8)\d{9}$/,
                            message: '联系电话格式不正确'
                        }
                    }
                },
                txtShipWharf: {
                    validators: {
                        notEmpty: {
                            message: '上船地点不能为空'
                        }
                    }
                },
                txtShipAmount: {
                    validators: {
                        notEmpty: {
                            message: '包船金额不能为空'
                        },
                        regexp: { //正则表达式
                            regexp: /^[+]{0,1}(\d+)$/,
                            message: '包船金额格式不正确'
                        }
                    }
                },
                txtFishingPrice: {
                    validators: {
                        notEmpty: {
                            message: '钓位价不能为空'
                        },
                        regexp: { //正则表达式
                            regexp: /^[+]{0,1}(\d+)$/,
                            message: '钓位价格式不正确'
                        }
                    }
                },
                txtFishingQty: {
                    validators: {
                        notEmpty: {
                            message: '钓位限坐人数不能为空'
                        },
                        regexp: { //正则表达式
                            regexp: /^[+]{0,1}(\d+)$/,
                            message: '钓位限坐人数格式不正确'
                        }
                    }
                }
            }
        });



    });

</script>
